﻿using System.Text.RegularExpressions;

namespace BlogsAPI.Shorteners
{
    using System;
    using System.IO;
    using System.Net;
    using System.Text;
    using System.Xml;
    using Abstract;

    /// <summary>
    /// tr.im is no longer accepting URL shortening requests via its website. May we respectfully suggest that you choose one of the many other wonderful alternatives available, listed herein.
    /// </summary>
    /// <seealso cref="http://tr.im/website/api"/>
    /// <remarks>
    /// Why has my IP address been banned? 
    /// We have automated API protection measures in place to protect our API from excessive requests
    /// and attacks. If you are using the API and are repeatedly seeing the tr.im response code for an
    /// API rate limit -- code 425 -- and you continue submitting requests 10x in excess of the API
    /// limit you are up against, we automatically ban your IP address for 48 hours. You need to check 
    /// the tr.im response code if you are submitting lots of requests to us from the same IP address.
    /// </remarks>
    [Obsolete("tr.im is no longer accepting URL shortening requests via its website. May we respectfully suggest that you choose one of the many other wonderful alternatives available, listed herein.",true)]
    [SingleShortener(Link = "http://tr.im")]
    public class Trim : Shortener
    {
        /// <summary>
        /// Конструктор по умолчанию
        /// </summary>
        [Obsolete("Service has been turned off @ 20/03/2010")]
        public Trim()
        {
        }

        /// <summary>
        /// Заполняем данными пользователя
        /// Работа с имеющимся Tr.im аккаунтом
        /// </summary>
        /// <param name="username">имя пользователя</param>
        /// <param name="password">пароль пользователя</param>
        [Obsolete("Service has been turned off @ 20/03/2010")]
        public Trim(String username, String password)
        {
            _username = username;
            _password = password;
        }

        /// <summary>
        /// Заполняем данными пользователя
        /// Работа с имеющимся Tr.im аккаунтом
        /// </summary>
        /// <param name="apikey">ключ приложения</param>
        [Obsolete("Service has been turned off @ 20/03/2010")]
        public Trim(String apikey)
        {
            _apikey = apikey;
        }
    }
}
